import java.util.Scanner;

public class damo4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个字符串");
        //123
        String next = sc.next();
        System.out.println("请输入第二个字符串");
        String next1 = sc.next();
        int reverse = reverse(next);
        int reverse1 = reverse(next1);
        int result = reverse1 * reverse;
        System.out.println(result);
    }

    //这个方法可以将输入的字符串转为数字
    public static int reverse(String sr) {
        int sum = 0;
        if(sr.length()==1){
            int i = sr.charAt(0) - 48;
            return i;
        }
        for (int i = 0; i < sr.length(); i++) {
            char c = sr.charAt(i);
            int i1 = c - 48;
            if (i == 0) {
                sum = i1;
                sum = sum * 10;
                System.out.println("第一个:" + sum);
            } else if (i == sr.length() - 1) {
                sum = (sum + i1);
            } else {
                sum = (sum + i1) * 10;
                System.out.println(sum);
            }


        }

        return sum;
    }
}
